Film source video detection

ABSTRACT

A television line doubler (interlaced to progressive scan converter) incorporating the following aspects--an improved field motion detector which does not treat low frequency vertical transitions as motion; a frame motion detector having an improved ability to differentiate motion from subcarrier signal components; a sawtooth artifact detector; a sawtooth artifact detector in combination with a film pattern detector, such that the artifact detector can take the film pattern detector out of film mode earlier than it would if it only were responsive to a break in the film pattern; tandem field motion detectors; an improved field based film detector; film pattern detectors and motion detectors used therewith which operate by performing end-of-field calculations; the combination of a field motion detector and a frame motion detector such that the frame motion detector provides a motion signal used as a verification by the field motion detector; an improved NTSC film detector requiring a minimum number of NTSC film pattern sequences; and an improved PAL film detector employing a minimum motion threshold detector.

FIELD OF THE INVENTION

The present invention relates to television signal processing. Moreparticularly, the present invention relates to improved signalprocessing apparatus and methods for detecting motion picture filmsources in television signals.

CROSS REFERENCE TO RELATED APPLICATION

Portions of the present application are common to the copendingapplication of Yves C. Faroudja, Peter D. Swartz and Jack C. Campbellentitled "High-definition Television Signal Processing for Transmittingand Receiving a Television Signal in a Manner Compatible with thePresent System," Attorneys' Docket FAR004, filed the same day as thepresent application.

DESCRIPTION OF RELATED ART

In accordance with U.S. Pat. No. 4,876,976, it is known to detect that a60 Hz NTSC television signal has as its source a 24 frame/second motionpicture film. A 24 frame/second film is applied to and synchronized with60 Hz NTSC video by using a 3-2 film pull-down ratio such that threevideo fields come from one film frame and the subsequent two videofields come from the next film frame (e.g., AABBBCCDDDEE, etc., where"A," "B," etc. are successive film frames). Video fields of the sameparity in adjacent video frames are compared. When motion is present, adistinctive repeating pattern is obtained only if the video source isfilm (i.e., 1101111011, etc., where "1" indicates motion and "0"indicates no motion).

U.S. Pat. No. 4,982,280 discloses an arrangement for detecting a 30 Hzprogressive scan source, which may be a video camera or film, in a 60 Hzprogressively scanned non-interlaced television system. In the presenceof motion from frame-to-frame within the 30 Hz progressively scannedvideo image sequences, when the video sequences in adjacent video fieldsare compared a 010101, etc. pattern results, indicating a 30 Hzprogressively scanned source. Comparison of every second video field, toyield a 111111, etc., pattern, further confirms the 30 Hz progressivescan source. In order to operate, the arrangement relies on the spatialcoincidence of pixels in the successive identical pairs of fields of theprogressive scan television signal.

Published International Patent Application WO 94/30006 disclosesapparatus for detecting twenty-five frame per second motion picture filmsources in 50 Hz television signals, such as PAL, SECAM, 50 Hz NTSC, 50Hz HDTV and 50 Hz monochrome television signals. The detection schemelooks for differences in motion between a field and the previous field,on one hand, and between the same field and the subsequent field, on theother hand.

The detection of motion picture film sources in television signals isuseful in various environments, for example, a line doubler, atelevision standards converter, a television slow motion processor and avideo information compressor.

A well-known "line-doubling" technique employs the conversion of aninterlaced television signal (such as employed in the NTSC, PAL andSECAM systems), in which two time consecutive interleaved fields of scanlines represent a frame, to a non-interlaced or progressively scannedtelevision signal, in which all of the scan lines in the frame arescanned out sequentially. The result, in the case of NTSC, is that 525scan lines are presented every one-sixtieth of a second rather than262.5 scan lines, thus potentially doubling the vertical resolution tothe full frame resolution of 525 lines. Typically, line doublers employ,at least part of the time, field merging or inter-field interpolation,which provides a full doubling of the vertical resolution. Pairs offields are combined to form a single progressively scanned frame. Sucharrangements are described in U.S. Pat. Nos. 4,876,956; 4,967,271;4,982,280; 4,989,090, 5,159,451 and 5,291,280.

One problem resulting from field merging is that there is a timedifference between fields in the interlaced television signal. Thus, amoving object may be in different locations from field to field and, iftwo such fields are combined to form a single frame, the vertical anddiagonal edges of objects moving horizontally or diagonally appear asragged sawtooths rather than smooth curves. Line doubling is lost alongsuch transitions. The sawtooth effect is exacerbated if the reproductionsystem employs vertical enhancement. A sawtooth pattern is an artifactcreated by the incorrect interleaving of two fields arising fromdifferent film frames. Visually what should be a continuous vertical ordiagonal line will appear as a zigzag on the edge.

One solution to this problem is to employ some type of scan line orintra-field interpolation in regions of the television picture displayin which movement is occurring. An improved technique for providingintra-field interpolation in areas of the picture having motion is setforth in said U.S. Pat. No. 4,989,090.

A potential problem with switchable inter-field/intra-fieldinterpolation line doublers is that motion may not be properly detectedat all times, thus allowing the above mentioned jagged vertical ordiagonal transition artifacts to appear briefly and intermittently. Sucharrangements may have particular difficulty in consistently switchingcorrectly between operating regimes when operating on an interlacedtelevision signal that has been subject to data compression or standardsconversion (as from PAL to NTSC, for example).

Another known solution to the problem is to recognize when the source ofthe interlaced television signal is a motion picture film. As mentionedabove, in the United States, 24 frame per second motion picture filmsare applied to the 30 frame per second NTSC television signal by meansof a "3-2 pulldown ratio," such that a patterned sequence of 3 filmframes, 2 film frames, 3 film frames, etc. are carried by consecutivetelevision fields. By identifying pairs of interlaced fields carryingthe same film frame, the pairs may be merged to generate essentiallyperfect line doubled progressively scanned frames, each representing amotion picture frame. Such techniques are described in said U.S. Pat.Nos. 4,876,596, 4,982,280 and 5,291,280.

However, the motion picture film detection arrangement is also subjectto problems. For example, a video edit (rather than a film edit) maydisrupt the 3-2 pulldown ratio, causing merged television fields to bederived from different film frames. Thus, until the film pulldown ratiodetection circuitry resynchronizes itself (typically one to four fieldsof the input interlaced television signal), the ragged sawtoothtransition artifacts, described above, may appear at the edges of movingobjects. Although the undesired effect is fleeting, it is perceptible tothe eye, occasionally disturbing an otherwise near perfect line doublingarrangement.

The last discussed problem may also arise in the motion picture filmsource line doubling arrangement when the input interlaced televisionsignal fades from a film source to a video source. In that case, thesystem, as described, for example, in said U.S. Pat. No. 4,982,280,continues to operate in its "film mode" for a few fields beforerecognizing the loss of the 3-2 pull down pattern and switching to aninter field/intra-field interpolation arrangement of the sort describedabove. During those few fields before changeover from the film mode ofoperation, the same sort of ragged sawtooth artifacts may be generatedif there is motion between the fields. In addition, the problem may alsoarise when the interlaced television signal derived from a motionpicture source has been imperfectly data compressed or standardsconverted.

One solution to the problem of video edits disrupting the 3-2 pulldownratio is set forth in said U.S. Pat. No. 5,291,280. The solution employsa field motion detector and includes circuitry to "look ahead" for videoedits. However, as is explained in connection with the various aspectsof the present invention, there are shortcomings in said U.S. Pat. No.5,291,280 patent and in other prior art such that there is still a needto provide a better film motion detector for use in line doublers and inother applications as mentioned above.

SUMMARY OF THE INVENTION

The present invention has a number of aspects--an improved field motiondetector which does not treat low frequency vertical transitions asmotion; a frame motion detector having an improved ability todifferentiate motion from subcarrier signal components; a sawtoothartifact detector; a sawtooth artifact detector in combination with afilm pattern detector, such that the artifact detector can take the filmpattern detector out of film mode earlier than it would if it only wereresponsive to a break in the film pattern; tandem field motiondetectors; an improved field based film detector; film pattern detectorsand motion detectors used therewith which operate by performingend-of-field calculations; the combination of a field motion detectorand a frame motion detector such that the frame motion detector providesa motion signal used as a verification by the field motion detector; animproved NTSC film detector requiring a minimum number of NTSC filmpattern sequences; an improved PAL film detector employing a minimummotion threshold detector; combinations of these various aspects; and aline doubler (interlaced to progressive scan converter) incorporatingone or more of these various aspects.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a functional block diagram showing an overall view of thepresent invention, including its various aspects.

FIG. 2 is a quasi-three-dimensional representation of three consecutiveinterlaced-scan television fields, showing relative pixel locationswithin the respective fields.

FIG. 3 is a functional block diagram showing an interlace to linedoubled progressive scan converter environment in which the presentinvention or aspects thereof may be employed.

FIG. 4 is a functional block diagram showing details of the field motiondetector of FIG. 1.

FIGS. 5A-F are a series of idealized diagrams showing pixel amplitudesin video streams for the case of a prior art field motion detectorhaving a high-frequency (sharp) vertical transition with no motion.

FIGS. 6A-F are a series of idealized diagrams showing pixel amplitudesin video streams for the case of a prior art field motion detectorhaving a high-frequency (sharp) vertical transition with motion.

FIGS. 7A-F are a series of idealized diagrams showing pixel amplitudesin video streams for the case of a prior art field motion detectorhaving a low-frequency (broad) vertical transition with no motion.

FIGS. 8A-F are a series of idealized diagrams showing pixel amplitudesin video streams for the case of a field motion detector according to anaspect of the present invention having a high-frequency (sharp) verticaltransition with no motion.

FIGS. 9A-F are a series of idealized diagrams showing pixel amplitudesin video streams for the case of a field motion detector according to anaspect of the present invention having a high-frequency (sharp) verticaltransition with motion.

FIGS. 10A-F are a series of idealized diagrams showing pixel amplitudesin video streams for the case of a field motion detector according to anaspect of the present invention having a low-frequency (broad) verticaltransition with no motion.

FIG. 11 is a functional block diagram showing details of the framemotion detector of FIG. 1.

FIG. 12 is a functional block diagram showing details of the NTSC filmdetector of FIG. 1.

FIG. 13 is a functional block diagram showing details of the PAL filmdetector of FIG. 1.

FIG. 14 is a functional block diagram showing details of the sawtoothdetectors of FIG. 1.

FIG. 15A-D are idealized representations of correctly and incorrectlyinterleaved scan lines, the incorrectly interleaved scan linesdisplaying the sawtooth artifact.

FIG. 16 is a functional block diagram showing details of the sawtoothbased edit detector of FIG. 1.

INCORPORATION BY REFERENCE

Each of the following United States Patents, mentioned in the presentapplication, are hereby incorporated by reference in their entirety:U.S. Pat. Nos. 4,876,596; 4,967,271; 4,982,280; 4,989,090; 5,159,451;5,291,280; 5,488,422; and 5,625,421.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Except as noted herein, practical embodiments of the invention may beimplemented using analog, digital (including digital signal processingwith software), or hybrid analog/digital techniques. The equivalency ofanalog and digital implementations in most contexts is well known tothose of ordinary skill in the art.

Throughout this document, for simplicity, signal inputs and outputs aredrawn as single points and signal carrying lines are drawn as singlelines. It will be understood that, in practice, more than one input oroutput point and more than one signal carrying line may be required,depending on the format of the signals and the manner in which thepractical embodiments of the invention are physically constructed.

It should also be understood that functions shown separately may becombined with others in whole or in part. In addition, those of ordinaryskill in the art will understand that, in practice, switches shownthroughout the various figures will be implemented electronically or insoftware rather than mechanically.

The invention or aspects of the invention may be advantageously employedin connection with an interlace to line doubled progressive scanconverter which, for example, precedes a video data compressor or astandards converter. Both video compression and standards conversion aremore accurately and easily accomplished when operating on aprogressively scanned television signal rather than an interlacedtelevision signal. By employing the present invention in a progressivescan converter preceding such video compression or standards conversion,such processes are assured to be operating on a more optimum signalsource.

An overall view of the present invention, including its various aspectsis shown in FIG. 1. FIG. 3, described below, shows an interlace to linedoubled progressive scan converter environment in which the presentinvention or aspects thereof may be employed.

Referring now to FIG. 1, a signal Y_(in) is applied to an array of fieldand line memories 102. The signal Y_(in) may be a monochrome videosignal or the luminance components of a component color video signal.Those of ordinary skill in the art will understand that a componentvideo signal may comprise analog or digital components such as RGB (fromwhich luminance and chrominance components may be derived), Y/I/Q,Y/U/V, Y/R-Y/B-Y, Y/Cr/Cb, etc. Furthermore, in the case of digitalcomponents, the received digital component video signal may be in any ofa number of compressed or uncompressed formats, including, for example,various ones of the digital component video formats in accordance withthe recommendations, standards or compression algorithms of the CCIR(International Radio Consultative Committee) (such as the hierarchy ofdigital video coding formats under CCIR Recommendation 601, the 4:2:2format often being referred to as a CCIR 601 video signal), ISO/MPEG(the Motion Picture Experts Group of the International StandardsOrganization), SMPTE (Society of Motion Picture and TelevisionEngineers), EBU (European Broadcasting Union), and/or therecommendations or standards of other industry, governmental orquasi-governmental bodies.

The array of memories 102 provides five outputs comprising time-delayedversions of Y_(in), which, along with Y_(in) itself, provide sixtime-spaced versions of the input luminance signal: two in a firsttelevision field F0, two in a second television field F1 and two in athird television field F2.

The time-spacing of the six signal streams with respect to the spatiallocation of pixels (television picture elements) in the threeconsecutive fields may be better understood by reference to therepresentation of FIG. 2. FIG. 2 is a quasi-three-dimensionalrepresentation in which the vertical and horizontal dimensions lie inthe plane of a television picture field such that the vertical axis isthe vertical direction of a television picture field, perpendicular tothe scan lines, the horizontal axis is the horizontal direction of thetelevision picture field, parallel to the scan lines, and the directionperpendicular to the plane of each field is a quasi-time axis in whicheach consecutive field is shown at a discrete time. At some arbitrarytime during the active picture information of a television field, apixel may be represented as point P(F0-1H) in field F0. That pixel isshown in FIG. 2 as a point in a horizontal scan line. A second pixel infield F0, pixel PF0, occurring one line later in time, is directly belowpixel P(F0-1H) vertically and is shown as a point in the next lowerhorizontal scan line. A first pixel in field F1, occurring 262 lines (inthe case of NTSC, for PAL, 312 lines) after pixel P(F0), and a secondpixel in field F1, occurring 263 lines (in the case of NTSC, for PAL 313lines) after pixel P(F0), may referred to as pixel P(F1-1/2H) and pixelP(F1+1/2H), respectively. Pixel P(F1-1/2H), shown as a point in a firsthorizontal scan line, is directly above pixel P(F1+1/2H) vertically,which pixel is shown as a point in the next lower horizontal scan line.A point P(F1) in field F1, corresponding spatially to the location inwhich pixel P(F0) of field F0 lies, is half way between pixel P(F1-1/2H)and pixel P(F1+1/2H) due to the interlacing offset of horizontal scanlines from field to field. Thus, pixel P(F1-1/2H) precedes, by the timeof one-half line, the point P(F1), while pixel P(F1+1/2H) is, by thetime of one-half line, after the point P(F1). The spatial point in fieldF2 corresponding to F0 and F1 is the location of pixel P(F2), occurring525 lines, exactly one frame or two fields, after pixel P(F0). PixelP(F2) is shown as a point in a horizontal scanning line in field F2. Asecond pixel in field F2, P(F2-1H), occurring one horizontal line timeearlier, is shown as a point in the horizontal scan line immediatelyabove the scan line containing pixel P(F0).

Returning again to FIG. 1, wherein the details of the array of field andline memories 102 are shown, the undelayed input luminance signal streamY_(in) itself provides the F0-1H output stream. The input luminancesignal stream Y_(in) is applied to a first 1H (one horizontal line time)delay 104 to provide the F0 output stream. The output of delay 104 isalso applied to a first nH delay 106 (where n is 262 lines for NTSC, 312lines for PAL) to provide the F1-1/2H output stream. The delay 106output is applied to a further 1H delay 108, to provide the F1+1/2Houtput stream and to a further nH delay 110 (where n is 262 lines forNTSC, 312 lines for PAL) to provide the F2-1H output stream. The delay110 output is also applied to yet a further 1H delay 112 to provide theF2 output stream. The delays may be implemented by various hardware,software and hybrid hardware/software techniques well known to those ofordinary skill in the art. Although the delays are shown as seriesdelays, they may be implemented in other ways such as by a multiportrandom access memory in which the signal stream is read in once and readout multiple times or by other equivalent ways.

Thus, the array of memories 102 provides six signal output streamscorresponding to six pixel locations, two in each of three consecutivefields: pixels at time positions F0-1H and F0 in field F0, pixels attime positions F1-1/2H and F1+1/2H in field F1, and pixels at timepositions F2-1H and F2 in field 2.

A field motion detector 114, described below, receives the F0, F1-1/2Hand F1+1/2H signal streams, signals spaced apart in time by one fieldminus one-half line and by one field plus one-half line. It is known toapply such inputs to field motion detectors--see, for example, U.S. Pat.Nos. 4,982,280 and 5,291,280. The purpose of the field motion detectoris to detect motion (having a velocity greater than, for example, onehalf line per field) from interlaced field to interlaced field withoutfalsely detecting motion when a vertical transition occurs (for example,when the portion of the picture below a horizontal line is black and theportion of the picture above the line is white, or vice-versa). Althougha field motion detector of the type disclosed in said U.S. Pat. No.5,291,280 patent may be employed in aspects of the present invention, itis preferred to employ the improved field motion detector describedbelow, which forms an aspect of the present invention, because of itsgreater resistance to false detection caused by certain types ofvertical transitions. While a field motion detector such as that of theU.S. Pat. No. 4,982,280 patent may be employed in aspects of the presentinvention, the field motion detector of said U.S. Pat. No. 5,291,280patent is preferable to that of the U.S. Pat. No. 4,982,280 patent inthat the earlier patent provides no immunity to false detectionresulting from vertical transitions. The output of the field motiondetector 114, F0_(mtn), is applied to an NTSC film detector 118 and to aPAL film detector 120, each of which is described below.

Optionally, a second field motion detector (not shown) below may receivethe F2, F1-1/2H and F1+1/2H signal streams, signals also spaced apart intime by one field minus one-half line and by one field plus one-halfline. Such a second field motion detector could be used to provideadditional redundancy or to provide increased accuracy in processing.

The F0 and F2 outputs of memories 102 are applied to a frame motiondetector 114 where the two signals are compared on a pixel by pixelbasis. The output of the frame motion detector, "MOTION," is applied tothe NTSC film detector 118, the PAL film detector 120, and to a sawtoothbased edit detector 126, described below. The MOTION signal may also beapplied as an input to an interlace-to-line-doubled progressive-scanconverter as shown in FIG. 3. Frame motion detectors receiving F0 and F2signal stream inputs are known in the prior art--see, for example, saidU.S. Pat. No. 4,982,280, said U.S. Pat. No. 4,967,271 and said U.S. Pat.No. 5,291,280. Various frame motion detectors, including those of saidU.S. Pat. Nos. 4,982,280, 4,967,271 and 5,291,280 patents, may beemployed as the frame motion detector in aspects of the presentinvention. However, it is preferred to employ the improved frame motiondetector, which forms an aspect of the present invention, describedbelow.

The F0-1H, F0, F1-1H and F1+1H signal streams and the F2, F2-1H, F1-1Hand F1+1H signal streams, respectively, are applied to an F0 sawtoothdetector 128 and an F2 sawtooth detector 130. Each sawtooth detectorlooks for the zigzag artifact that an incorrect interleaving of field 1and field 0 or field 1 and field 2 would yield. The outputs of these twodetectors, F0_(saw) and F2_(saw), respectively, are applied to thesawtooth-based edit detector 126. Sawtooth detectors are disclosed inU.S. Pat. No. 5,625,421. The sawtooth detection techniques forming anaspect of the present invention differ from those in said U.S. Pat. No.5,625,421 patent in that the sawtooth detectors of the patent operateafter interlace-to-progressive conversion (after line doubling) insteadof before such conversion.

As explained further below, the NTSC and PAL film detectors (118 and120, respectively) examine the accumulated field motion between field 0and field 1 and then search for the field motion film sequence pattern(a "10100" pattern in NTSC and a "10" pattern in PAL) before determiningthat the material is film and not video. In said U.S. Pat. No. 4,982,280patent, frames, instead of fields, are compared in the film detectors.The film detectors of the U.S. Pat. No. 4,982,280 patent impose aminimum size constraint instead of accumulating pixel differences.Nevertheless, a state machine as in said U.S. Pat. No. 4,982,280 patentmay be employed in the film detectors of the present invention. The filmdetectors are reset by an edit Y/N (yes/no) signal when a "bad edit" isdetected. A bad edit means an edit performed in video on film materialwhen two complete film frames have not been removed, thereby breakingthe 3-2 pulldown ratio. A film sequence might look like

    AAABBCCCDDEEEFF,

a good edit might look like

    AAABBEEEFF,

and a bad edit might look like

    AAACCCDDEEEFF,

where A, B, etc. are video fields derived from a particular motionpicture frame (frame A, B, etc.).

The outputs of the film detectors are two signals, a film Y/N (yes/no)signal and an F0/F2 signal. The film Y/N chooses the mode under whichthe line doubler functions (see FIG. 3). The F0/F2 signal selects whichfield signal stream, F0 or F2, for the line doubler (see FIG. 3) tointerleave (merge) with F1-1/2H when the material is film. The film Y/Nand F0/F2 signal may be applied as inputs to aninterlace-to-line-doubled progressive-scan converter as shown in FIG. 3.

The outputs of one of the two film detectors are selected by adouble-pole double-throw switch 132. The switch is controlled by anexternally supplied NTSC/PAL signal. This selects the appropriate filmdetector to be active dependent upon the input video format. The PALfilm detector may also be employed to detect 30 frame/second sources inNTSC signals, in which case the switch 132 is placed in the PAL switchposition.

The output of the F0 and F2 sawtooth detectors (128 and 130), F0_(saw)and F2_(saw) along with the motion signal, film Y/N and F0/F2 signalsare combined in the sawtooth based edit detector 126 to create the editY/N signal used for resetting the film detectors 118 and 120. An edit Ysignal immediately resets the film Y/N signal to N.

Referring now to FIG. 3, which shows an interlace to line doubledprogressive scan converter environment in which the present invention oraspects thereof may be employed, the input signal Y_(in) (see commentsabove regarding the nature of Y_(in)) is applied to block 302, whichincludes the various functions of the FIG. 1 arrangement. Block 302provides a first video stream having the F0 timing, a second videostream having the F1-1/2H timing (i.e., nominally 1 field time after theF0 stream timing), and a third video stream having the F2 timing (whereF0, F1-1/2H and F2 are as described in connection with FIGS. 1 and 2).The F1-1/2H video stream provides the "direct" field Y_(dir) to oneinput of a line doubler pair 304. The F0 and F2 video streams areapplied to a non-film video processor 306 and a film video processor308. Block 302 applies its F0/F2 output to the film video processor 308and its film Y/N output to the control input of a single-poledouble-throw switch 310. The output of switch 310 provides the"interpolated" field, Y_(int), to the other input of the line doublerpair 304. The outputs from the line doubler pairs 304 are combined toprovide the output signal Y_(out).

In operation, scanning lines from the interpolated field Y_(int) areinterleaved with the scanning lines from the direct field Y_(dir). Theinterpolated field scanning lines are taken either from the F0 or the F2video stream, in the case of a motion picture film source, or, when thesource is not motion picture film, are synthesized by any of variousknown techniques such as intra-field interpolation, inter-fieldinterpolation, a combination of intra-field and inter-fieldinterpolation, or some other known technique. The example of FIG. 3assumes that the non-film video processor 306 operates adaptively inresponse to the applied motion signal such that it employs inter-fieldinterpolation for conditions of no motion or low motion (for example, byaveraging F0 and F2) and intra-field interpolation for conditions ofmedium to high motion. The film video processor selects either the F0 orF2 video stream in response to the F0/F2 signal when a film source isdetected, assuring that the correct field is merged with the directfield.

Field Motion Detector

Details of the field motion detector of FIG. 1 are shown in FIG. 4. Thefield motion detector compares temporally adjacent pixel information ofopposing field parity (field 0 and field 1, for example) anddifferentiates field-to-field motion from vertical picture transitionsto provide a field motion signal.

Each field motion detector includes three subtractors (402, 404 and406), a keep smaller absolute value function 408, a magnitude comparator410, and a motion/no-motion switch 412. Subtractor 402 receives theF1-1/2H and F0 signals. Subtractor 404 receives the F0 and F1+1/2Hsignals. Subtractor 406 receives the F1-1/2H and F+1/2H signals. Thefield motion detector described in U.S. Pat. No. 5,291,280 (see, e.g.,FIG. 3) employs subtractors 402 and 404, receiving the same inputs asjust described, and the keep smaller absolute value function 408. Thefield motion detectors of the present invention may use the same keepsmaller absolute value function arrangement as in said U.S. Pat. No.5,291,280 patent.

Inter-field subtractions yield field motion but also incorrectly detectvertical transitions as motion. The keep smaller absolute value functionchooses the smaller of the two inter-field subtractions and therebydifferentiates high frequency vertical transitions from motion.Unfortunately low frequency vertical transitions are still detected asmotion. To overcome this shortcoming, the field motion detector of thepresent invention adds a single line vertical differentiator (the thirdsubtractor 406), whose output, a measure of vertical energy, is comparedin magnitude comparator 410 to the output of the keep smaller absolutevalue function 408, an measure of field motion. Subtractor 406,functioning as a single line vertical differentiator, looks for avertical transition within a field. If the magnitude of the verticaltransition is greater than the magnitude of the field motion, then avertical transition was incorrectly determined to be motion so theoutput switch goes to the NO position and no motion is detected.However, if the field motion is greater than the vertical energy, themotion value YES is output. This yields a more precise motion detection.It will be noted that sign of motion information signals from thesubtractors are irrelevant in view of the keep smaller absolute valuefunction.

The inability of the prior art field motion detector to differentiatebetween low-frequency vertical transitions and motion versus theperformance of the improved field motion detector of the presentinvention may be better understood by reference to FIGS. 5-10 whichdepict idealized representations of pixel amplitudes (in consecutivelines) (i.e., vertical pixels rather than horizontal pixels) versus timein time-spaced video streams for various signal conditions and theresulting field motion detector signal outputs. FIGS. 5-7 relate to theprior art field motion detector as disclosed in said U.S. Pat. No.5,291,280 patent (which, as noted above, forms a portion of the improvedfield motion detector of the present invention), while FIGS. 8-10 relateto the improved field motion detector of the present invention. Inreferring to FIGS. 5-10, reference may be made to FIG. 2 to appreciatemore fully the relative position of the various pixels in the interlacedvideo fields.

Referring now to FIG. 5 (prior art--high-frequency vertical transition,no motion), FIG. 5A shows pixel amplitudes in consecutive lines in thevideo stream F0; FIG. 5B shows pixel amplitudes in the video streamF1-1/2H (262 lines in time after the F0 video stream); and FIG. 5C showspixel amplitude values in the video stream F1+1/2H (263 lines in timeafter the F0 video stream). Subtractor 402 produces the output shown inFIG. 5D (one pixel), while subtractor 404 produces the output shown inFIG. 5E (no pixels). The keep smaller absolute value function 408 thusproduces the output shown in FIG. 5F (no pixels). This output, theoutput that would be provided by the field motion detector of said U.S.Pat. No. 5,291,280 patent, is the correct output--the high-frequencytransition in the presence of no motion results in the correct "nomotion" output for each of the pixel positions.

Referring now to FIG. 6 (prior art--high-frequency vertical transition,motion), FIG. 6A shows pixel amplitudes in consecutive lines in thevideo stream F0; FIG. 6B shows pixel amplitudes in the video streamF1-1/2H (262 lines in time after the F0 video stream); and FIG. 6C showspixel amplitude values in the video stream F1+1/2H (263 lines in timeafter the F0 video stream). Subtractor 402 produces the output shown inFIG. 6D (two pixels), while subtractor 404 produces the output shown inFIG. 6E (three pixels). The keep smaller absolute value function 408thus produces the output shown in FIG. 6F (two pixels). This output, theoutput that would be provided by the field motion detector of said U.S.Pat. No. 5,291,280 patent, is the correct output--the high-frequencytransition in the presence of motion results in the correct "motion"output (motion signals at pixel positions in two lines, indicating theamplitude of the relative field to field motion).

Referring now to FIG. 7 (prior art--low-frequency transition, nomotion), FIG. 7A shows pixel amplitudes in consecutive lines in thevideo stream F0; FIG. 7B shows pixel amplitudes in the video streamF1-1/2H (262 lines in time after the F0 video stream); and FIG. 7C showspixel amplitude values in the video stream F1+1/2H (263 lines in timeafter the F0 video stream). Each shows slowly increasing pixel values aswould occur in the case of a low-frequency vertical transition (a fadefrom black to white). Subtractor 402 produces the output shown in FIG.7D (four low level pixels), while subtractor 404 produces the outputshown in FIG. 7E (four low level pixels). The keep smaller absolutevalue function 408 thus produces the output shown in FIG. 7F (three lowlevel pixels). This output, shown in FIG. 7H, the output that would beprovided by the field motion detector of said U.S. Pat. No. 5,291,280patent, is an incorrect output--the low-frequency transition in thepresence of no motion results in an incorrect "motion" output (lowamplitude motion signals at pixel positions in three lines).

Referring now to FIG. 8 (present invention--high-frequency verticaltransition, no motion), FIG. 8A shows pixel amplitudes in consecutivelines in the video stream F0; FIG. 8B shows pixel amplitudes in thevideo stream F1-1/2H (262 lines in time after the F0 video stream); andFIG. 8C shows pixel amplitude values in the video stream F1+1/2H (263lines in time after the F0 video stream). Subtractor 402 produces theoutput shown in FIG. 8D (one pixel), while subtractor 404 produces theoutput shown in FIG. 8E (no pixels). The keep smaller absolute valuefunction 408 thus produces the output shown in FIG. 8F (no pixels).Subtractor 406 produces the output shown in FIG. 8G (one pixel). Sincethe subtractor 406 output, indicating vertical energy, is greater thanthe keep smaller absolute value function 408 output, the magnitudecomparator cause the switch 412 to its no position, resulting in nooutput, indicating no motion. The output, shown in FIG. 8H, is the sameas the prior art (see FIG. 5).

Referring now to FIG. 9 (present invention--high-frequency verticaltransition, motion), FIG. 9A shows pixel amplitudes in consecutive linesin the video stream F0; FIG. 9B shows pixel amplitudes in the videostream F1-1/2H (262 lines in time after the F0 video stream); and FIG.9C shows pixel amplitude values in the video steam F1+1/2H (263 lines intime after the F0 video stream). Subtractor 402 produces the outputshown in FIG. 9D (two pixels), while subtractor 404 produces the outputshown in FIG. 9E (three pixels). The keep smaller absolute valuefunction 408 thus produces the output shown in FIG. 9F (two pixels).Subtractor 406 produces the output shown in FIG. 9G (one pixel). Sincethe subtractor 406 output, indicating vertical energy, is less than thekeep smaller absolute value function 408 output, the magnitudecomparator moves the switch 412 to its yes position for two pixel times,resulting in the keep smaller absolute value output being provided asthe field motion detector output, indicating motion with thoseamplitudes at the two pixel positions. For the remaining pixelpositions, the subtractor 406 output is greater than the keep smallerabsolute value function 408 output so that the magnitude comparatorplaces the switch 412 in its no position, resulting in no output,indicating no motion. The results, shown in FIG. 9H, are the same as theprior art (see FIG. 6).

Referring now to FIG. 10 (present invention--low-frequency verticaltransition, no motion), FIG. 10A shows pixel amplitudes in the videostream F0; FIG. 10B shows pixel amplitudes in consecutive lines in thevideo stream F1-1/2H (262 lines in time after the F0 video stream); andFIG. 10C shows pixel amplitude values in the video stream F1+1/2H (263lines in time after the F0 video stream). Subtractor 402 produces theoutput shown in FIG. 10D (four low level pixels), while subtractor 404produces the output shown in FIG. 10E (also four low level pixels). Thekeep smaller absolute value function 408 thus produces the output shownin FIG. 10F (four low level pixels). Subtractor 406 produces the outputshown in FIG. 10G (four higher level pixels). Since the subtractor 406output, indicating vertical energy, is more than the keep smallerabsolute value function 408 output, the magnitude comparator moves theswitch 412 to its no position, resulting in no output, indicating nomotion. The output, shown in FIG. 10H, is correct and different from theprior art (see FIG. 8). Thus, the improved field motion detector of thepresent invention retains the ability of the prior art to differentiatehigh-frequency transitions from motion while adding the capability todifferentiate low-frequency vertical transitions from motion.

Frame Motion Detector

The frame motion detector 124 (FIG. 1), shown in detail in FIG. 11,compares the F0 and F2 video stream signals on a pixel by pixel basis todetermine if the corresponding pixel in field F1 is likely to be inmotion. Many prior art frame detectors may be used in aspects thepresent invention, although the improved frame motion, which is about tobe described, is preferred.

In the frame motion detector described in said U.S. Pat. No. 4,982,280,high frequency motions are filtered out. This was done to keep anysubcarrier residue from being detected as motion. The frame motiondetector constituting an aspect of the present invention providesimproved differentiation of motion and subcarrier signal components.

In the improved frame motion detector forming a part of the presentinvention, a frame subtraction is performed between F0 and F2 insubtractor 1102. The subtractor 1102 output is then put throughcomplementary lowpass and highpass filters created by a lowpass filter1104 and subtractor 1106. In a digital embodiment, the lowpass filtermay be a five-tap FIR filter with a zero at the color subcarrierfrequency (in a frame detector intended for use with both NTSC and PAL,the filter characteristics may be switchable in accordance with whetheran NTSC or PAL signal is being processed). The horizontal lowpassfiltered path (where most of the motion lies) on line 1108 is rectifiedin rectifier 1110, and applied to a threshold function 1112 whichremoves noise components by applying a motion LPF noise threshold. In adigital implementation, the threshold 1112 may, for example, limit thesignal to four bits (from, say, eight bits). The horizontal highpassfiltered path on line 1114 goes into complementary vertical lowpass andhighpass filters created by subtractor 1116, adder 1118 and delay 1120(which provides a one-line delay for NTSC and a two-line delay in PAL).These paths, vertical HPF path 1122 and vertical LPF path 1124, are thenindividually rectified in rectifiers 1126 and 1128, respectively, andhave their own thresholds (threshold functions 1130 and 1132,respectively, which remove noise components by applying a motionHHPF-VHPF Noise threshold and a motion HHPF-VLPF Noise threshold,respectively) (where HHPF is horizontal highpass filter, etc.). In adigital implementation, the thresholds 1130 and 1132 may also limit therespective signals to 4 bits.

Thus, three paths are provided: a horizontally lowpass filtered (HLPF)path, a horizontally highpass filtered and vertically highpass filtered(HHPF-VHPF) path, and a horizontally highpass filtered and verticallylowpass filtered (HHPF-VHPF) path. The purpose of three paths is toseparate color subcarrier signal components from true motioninformation. The HLPF path output has substantially no subcarrier signalcomponents as a result of the horizontal lowpass filtering action of LPF1104. The two HHPF paths, carrying the complement of the HLPF path,require vertical filtering to reduce the subcarrier signal componentspresent in the high-frequency portion of the spectrum. Such componentshave the appearance of a vertical line pattern which may occur in realtelevision scenes. The filtering action of the HHPF-VHPF path passes lowamplitude level subcarrier signal components. By setting the HHPF-VHPFthreshold sufficiently high, true motion is differentiated from thesubcarrier components. The filtering action of the HHPF-VLPF pathrejects subcarrier components (which have a vertical component becausethey are out-of-phase from line to line) but passes horizontally movingpatterns of lines (referred to as "moving multiburst") which must bedetected as motion (such a pattern is rejected by the other two paths).The HHPF-VLPF path may have a lower threshold level than does theHHPF-VHPF path because the HHPF-VLPF path is not differentiating desiredfrom undesired signal components based on amplitude. The HLPF andHHPF-VLPF threshold levels are selected for noise immunity.

The three differently filtered motion paths are then combined in summer1134 and expanded in expansion function 1136. Preferably, they areexpanded horizontally by 5 pixels, temporally by 1 field and verticallyby 1 line. Techniques for such horizontal, vertical and temporalexpansion are known. See for example, said U.S. Pat. No. 5,488,422. Theoutput of block 1136 is applied to one input of a keep greater valuefunction 1138 and to a 262H/312H (262 lines for NTSC, 312 lines for PAL)delay, the output of which is applied as a second input to block 1138,and to a 1H (one line) delay 1142, the output of which is applied as athird input to block 1138. Blocks 1136-1142 provide a temporally andvertically expanded motion signal. The purpose of the temporal andvertical expansion is twofold--to avoid the situation when a fast movingobject leaves a "hole" between frames (e.g., a swinging pendulum) and,in the case of an NTSC signal, to avoid an appearance of flutteringbetween sharp and soft pictures when film material is not detected asfilm material. Also, expansion assures that the frame motion signal"surrounds" the field motion signal in the film detectors.

The frame motion detector has three adjustable parameters: the motionLPF noise threshold, the motion HHPF-VLPF noise threshold, and themotion HHPF-VHPF noise threshold. The parameters should be adjusted toas to minimize false detection of motion caused by noise and subcarriersignal components.

Film Detectors

Functionally, an NTSC film detector 118 is provided separate from a PALfilm detector 120. In practical embodiments, the two detectors arelikely to share circuitry and/or functions. Both film detectors have thesame purpose, to determine the onset of a film pattern, thus enteringthe film mode (indicated by putting the film Y/N signal in its Y (yes)condition), and, after entering the film mode, when the film pattern isbroken, thus exiting the film mode (indicated by putting the film Y/Nsignal in its N (no) condition). A different film pattern is native toeach video format (NTSC or PAL) (resulting from 24 frame/second filmsources in NTSC and 25 frame/second film sources in PAL). Both filmdetectors share certain characteristics and principles of operation.Both receive the F0_(mtn) output of the field motion detector 114, themotion output of the frame motion detector 124, and the edit Y/N signalfrom the sawtooth based edit detector 126. The primary input is thefield motion detector's F0_(mtn) signal. The frame motion signal servesas a verification of the field motion signal. The edit Y/N signalprovides an early indication, based on the detection of signalconditions that produce sawtooth artifacts, that the film pattern hasbeen broken.

Typical film detectors in the prior art intended to detect 24frame/second motion picture sources in NTSC television signals (see,e.g., said U.S. Pat. Nos. 4,982,280 and 5,291,280 patents) were framebased rather than field based. However, a field based film detector fordetecting 25 frame/second motion in PAL television signals is disclosedin Published International Patent Application WO 94/30006. The presentNTSC and PAL film detectors are an improvement on the field based PALfilm detector in said international application. Thus, for example, theframe based film pattern for NTSC is a five frame sequence--zerofollowed by four ones (as is well known, this pattern occurs forconditions of motion in the motion picture source, no motion causing theones to become zeros, but the particular zero position has to remain azero under all conditions to guarantee a film source). In the improvedfield based detection technique of the present invention, three zeropositions must remain zero in a five field sequence under all filmmotion conditions (the two one positions may assume either a one or zerocondition), thus allowing faster detection of a disruption in the filmpattern.

In addition, the present film detector is responsive to an edit Y/Nsignal provided by the sawtooth based edit detection functions such thatwhen the signal goes to its Y state, the film detector immediatelyleaves the film mode and the detector's film Y/N signal outputimmediately goes to N. The edit Y signal provides an indication within afield that the film sequence pattern is broken, thus providing an earlyindication before the film sequence pattern detector can make such adetermination (the pattern detector requiring at least a field to detectan error). Thus, the edit Y/N signal provides a second way (the firstbeing an interruption of the film pattern) to exit the film mode.

In frame based edit detection there is one type of edit that is notdetected because the sequence is not broken (the sequence AAABB122233--see the discussion below under the heading "Sawtooth Detectors"). Alledits are detected as bad edits in the field based detection (except forthe one "good" edit, which is allowable--see above for example of a"good edit").

NTSC Film Detector

The NTSC film detector 118 (FIG. 1) receives the F0_(mtn) output of thefield motion detector 114, the motion output of the frame motiondetector 124, and the edit Y/N signal from the sawtooth based editdetector. NTSC film detector 118 looks for 24 frame/second sources inNTSC television signals. It examines the accumulated field motionbetween field 0 and field 1 and then searches for the field motion filmsequence pattern "1 0 1 0 0" before determining that the material isfilm and not video. FIG. 12 shows the details of the NTSC film detector.

The primary input to the NTSC film detector is the F0_(mtn) output ofthe field motion detector 114 (FIG. 1). The F0_(mtn) signal is filteredin low-pass filter 1202 to remove subcarrier residue, rectified inrectifier 1204, and blanked by film motion blanking function 1206 tokeep any picture edge artifacts and subtitles from being detected asmotion. The rectified and blanked motion signal is then applied to athreshold 1208 to reduce noise artifacts. The threshold is set by afixed and predefined film noise threshold. In a parallel path the motioninput from the frame motion detector is thresholded by a threshold 1210into, in a digital implementation, a one-bit motion yes/no signal. Thisthreshold is set by a motion threshold. The one-bit motion yes/no signalis then used to control a motion-no motion switch 1212. The frame motionindication serves as a verification of the field motion indication--ifthere is no frame motion at a given pixel then there cannot be any fieldmotion for the same pixel (the frame motion has been expandedhorizontally and vertically to assure that the band of frame motionsurrounds the field motion). The one-bit field motion signal from switch1212 is then accumulated over the entire field in a field rateaccumulator 1214.

At the end of each field the data is latched in and the motion value isthen passed into three parallel paths, 1216, 1218 and 1220: 1) path 1216to a minimum of five field detector 1222 (although a minimum of fivefields is preferred to provide a safety margin, a minimum of threefields is practicable), 2) path 1218 to a three field weighted averager1224, and 3) path 1220 to one side of a subtractor 1226 whereend-of-field calculations are performed. At the beginning of each fieldthe accumulators are reset.

Because the field motion is not precise, a non-moving field might have anon zero value associated with it. The minimum of five field detector1222 looks at five adjacent fields for the minimum motion. For film infive adjacent fields there will always be a non-moving field, andtherefore the minimum motion value will correspond to it. This outputprovides the other input to the subtractor 1226 in order to remove thebase motion value associated with a non-moving field from theaccumulator 1214 output on path 1220. The subtractor 1226 output is thenpassed to a variable threshold 1228 whose threshold is determined by theoutput of block 1224, the weighted average of three fields.

Inasmuch as the motion threshold is dependent on the motion of thepicture information, picture information with little motion will have alower threshold than material with lots of motion. The minimum motiondetector 1222 and the weighted averager 1224 greatly increase thesensitivity of film detection on small moving scenes and factor outcomputer generated material which violates the Nyquist criterion. Theoutput of the variable threshold 1228, a "1" for a moving field and a"0" for a non-moving field, is then fed into a state machine 1230 thatlooks for the recurring sequence 10100. State machine 1230 may be of thetype described in said U.S. Pat. No. 4,982,280 patent. Once the numberof film sequences detected reaches the film sequence acquisition number,the film mode is activated. The film sequence acquisition number, thenumber of times the pattern must repeat to indicate detection of a filmsequence, is set by the system designer. For example, the number mightbe three for NTSC (although one might suffice) and five or six for PAL,which has a less unique film pattern.

The transition to video mode occurs upon either of two conditions: 1)when the film sequence is disrupted by a "0" being replaced with a "1"(note that once in film mode a "1" field can be replaced with a "0"field, as is the case of a non-moving field, but a non-moving fieldcannot be turned into a moving one), or 2) the edit Y/N signal goes high(yes).

Because the NTSC film detector of the present invention is field based,there are three places in the five field sequence that a bad edit cancause the film detector to drop out of film mode compared to the oneplace under the frame motion film detection scheme--01111. As explainedabove, a "0" cannot become a "1" but a "1" can become a "0" so the fieldmotion sequence has three "0"s that can be used as an edit detectorcompared to the one "0" on the frame based film sequence. This will havethe effect of minimizing the negative visual effects of bad edits.

The NTSC film detector has seven parameters: a film noise threshold, amotion threshold, an NTSC film sequence acquisition number and four filmblanking parameters that define the area of film motion detection inorder to minimize edge effects: film blanking top line, film blankingbottom line, film blanking right side, and film blanking left side.

PAL Film Detector

The PAL film detector 120 (FIG. 1) looks for 25 frame/second sources inPAL television signals and it may also look for 30 frame/second sourcesin NTSC television signals. It examines the accumulated field motionbetween field 0 and field 1 and then searches for the field motion filmsequence pattern "1 0" before determining if the material is film andnot video. Details of the PAL film detector are shown in FIG. 13.

The PAL film detector receives the same F0 field motion signal F0_(mtn)at its input and performs the same pixel rate processing as the NTSCfilm detector 118 (FIG. 1) of FIG. 6. In practice, the lowpass filter1202, the rectifier 1204, the blanking circuit 1206, the noise threshold1208, the motion threshold 1210, the motion/no-motion switch 1212 andthe field rate accumulator 1214 are common to the NTSC and PAL filmdetectors. Corresponding elements in the PAL film detector are assignedcorresponding "13xx" reference numerals. The common element, beingdescribed in connection with the NTSC film detector of FIG. 6, will notbe described again.

The end-of-field calculations performed in PAL differ from NTSC becausethe sequence being detected in NTSC differs from the one being detectedin PAL. The PAL recurring film sequence is "1 0." This sequence canoccur on video material for a few frames in a row so care must be takento differentiate this case. First the current field motion (B) fromfield rate accumulator 1314 is compared, in comparator 1340, inmagnitude with the last field motion (A), derived by delaying the fieldrate accumulator 1314 output in a 1 field delay 1342 (which may beimplemented as a flip-flop clocked at the field rate by the verticalsync signal) to form a motion sign signal at the comparator 1340 output.If the current value is greater than the previous motion value a "1" isoutput, conversely a "0" is output if the current value is less than orequal to the previous motion. In a parallel path the two motions, thecurrent field motion (B) and the last field motion (A), are modified byan operator 1344 to form the ratio |(A-B)/[(A+B)/2]|. This function, theabsolute value of the difference divided by the average, corresponds toan adjacent field motion ratio, which is then passed to a threshold 1346whose output is gated in AND-gate 1348 with the motion sign signal. Theintroduction of the minimum motion constraint is required because themotion sign signal does not care if the difference between A and B is 1or 1000. For video material it is not uncommon to obtain motion valuessuch as the following: 1000, 1410, 1400 and 1510. These would yield a "01 0 1" from the motion sign signal--a film-like pattern. A small motionfilm source might have the values as follows: 6, 100, 5, 110. Thus a PALminimum motion ratio will help differentiate between film and video.Alternatively, but less desirably, the arrangement in the NTSC filmdetector between the field rate accumulator (1214 in FIG. 12, 1314 inFIG. 13) and the state machine (1230 in FIG. 12, 1350 in FIG. 13) may beused.

If the minimum motion ratio constraint is met, then the motion sign isfed into the PAL film state machine 1350, which may be the same type ofstate machine as in said U.S. Pat. No. 4,982,280 patent. If not, a 0 isinput. PAL film mode is entered once the number of film sequencesreaches the PAL film sequence acquisition number.

As in the case of NTSC the transition to video mode occurs upon eitherof two conditions: 1) when the film sequence is disrupted, or 2) whenthe edit Y/N signal goes high. It should be noted that a single filmstate machine may be used for the NTSC and PAL film detectors providedthat a look-up table is used appropriate for the respective videostandard.

The PAL film detector, like the NTSC film detector, has eight adjustableparameters: a film noise threshold, a motion threshold, a PAL filmsequence acquisition number, a PAL minimum motion ratio and four filmblanking parameters that define the area of film motion detection: filmblanking top line, film blanking bottom line, film blanking right side,film blanking left side.

Sawtooth Detectors

The sawtooth detectors 128 and 130 (FIG. 1) look for the "sawtooth"artifact that an incorrect interleaving of F1 and F0 or F1 and F2yields. Details of the sawtooth detectors are shown in FIG. 14.

A sawtooth is characterized by the even numbered lines having similarvertical content and the odd numbered lines also having similar verticalcontent--the odd lines being horizontally offset from the even lines asdepicted in FIGS. 15A-15D. Sawtooth artifacts are explained further insaid U.S. Pat. No. 5,625,421 patent. FIG. 15A shows the displayedappearance of a vertical bar when the lines are correctly interleaved.FIG. 15B shows the same vertical bar when the lines are incorrectlyinterleaved. FIG. 15C shows a diagonal bar when the lines are correctlyinterleaved. FIG. 15D shows a diagonal bar when the lines areincorrectly interleaved.

Each sawtooth detector includes a bank of four subtractors 1402, 1404,1406 and 1408. For ease of understanding, assume that even numberedlines are in field 0 and odd numbered lines are in field 1 (withreference to FIG. 2, let the line containing pixel P_(F0-1H) be line 0,the line containing pixel P_(F0) line 2, the line containing pixelP_(F1-1/2H) line 1 and the line containing pixel P_(F1+1/2H) line 3):

    ______________________________________                                                                    Diagram                                           Subtractor   Signals Subtracted                                                                           Subtractions                                      ______________________________________                                        Subtractor 1402                                                                            (F0 - 1H) - F0 Line 0-Line 2                                     Subtractor 1404                                                                            F0 - (F1 - 1/2H)                                                                             Line 2-Line 1                                     Subtractor 1406                                                                            (F1 - 1/2H) -  Line 1-Line 3                                                  (F1 + 1/2H)                                                      Subtractor 1408                                                                            (F0 - 1H) - (F1 - 1/2H)                                                                      Line 0-Line 1                                     ______________________________________                                    

FIG. 14 and the above table shows signals present in the F0 sawtoothdetector. For the F2 sawtooth detector, substitute "F2-1/2H" for"F0-1/2H" and "F2 " for "F0."

The output of subtractors 1402-1408 proceed through four identicalparallel paths 1410-1416, each comprising four elements: a lowpassfilter (1418, 1420, 1422 and 1424, respectively) to remove anysubcarrier residue and noise; a rectifier (1426, 1428, 1430 and 1432,respectively); an edit blanker (1434, 1436, 1438 and 1440, respectively)to keep any picture edge artifacts from being detected as a sawtooth,and a threshold (1442, 1444, 1446 and 1448, respectively). Thethresholds of the intra-field subtractions 1402 and 1406 are the sameand require that the output be small thereby revealing that they alignvertically. The thresholds of the inter-field subtractions 1404 and 1408are the same and require that the output be large, indicating that thereis a horizontal displacement of the transition from field to field. Theoutputs of the four threshold circuits are applied to an AND-gate 1450:the outputs of thresholds 1442 and 1446 are applied through an invertinginput. Thus, the four signals are combined such that when the outputs ofsubtractors 1402 and 1406 are below the threshold and the outputs ofsubtractors 1404 and 1408 are above the threshold, a sawtooth ispredicted. The output of AND-gate 1450 is F0_(Saw) (F2_(Saw) from the F2sawtooth detector).

The sawtooth detectors have six adjustable parameters: a sawtooth 2Hsimilarity threshold, a sawtooth 1H difference threshold, and four editblanking parameters that define the area of edit motion detection: editblanking top line, edit blanking bottom line, edit blanking right side,and edit blanking left side.

Although the F0_(Saw) and F2_(Saw) signals indicate when isolatedsawtooth artifact signal conditions occur, more information is requiredto determine that a bad edit has occurred. The purpose of the sawtoothbased edit detector 126 is to process the F0_(Saw) and F2_(Saw) signalsalong with other information to identify a bad edit with reasonablereliability.

The sawtooth based edit detector 126 (FIG. 1), receiving the F0_(Saw)and F2_(Saw) signals, the F1-1/2H signal and the frame motion signal,looks for predicted sawtooth artifacts on field 0 and field 2 relativeto field 1. The number of sawtooths per line are accumulated andcompared with the number of moving horizontal transitions in the F1-1/2Hsignal. In the currently displayed field (F1), if the ratio of sawtoothsversus moving edges meets the minimum ratio and this ratio is met over apredefined number of adjacent lines, then an edit is detected. On thenon-displayed or alternate field (F0 or F2), if there are more sawtoothsthan moving edges and there are sawtooths detected on the currentlydisplayed field and this occurs over a predefined number of adjacentlines, an edit is detected. The details of the sawtooth based editdetector are shown in FIG. 16.

The sawtooth based edit detector has two distinct input portions: amoving edge detecting input portion and a sawtooth detecting inputportion. The moving edge detecting input portion receives the F1-1/2Hsignal input and applies it to a horizontal differentiator 1602 whichlooks for horizontal transitions. This may be implemented by a one-clock(one pixel) delay 1604 and a subtractor 1606. The differentiator 1602output is then filtered by a lowpass filter 1608, rectified by rectifier1610, blanked by edit blanker 1612 and applied to a threshold 1614 whichprovides noise thresholding under control of an H edge (horizontal edge)threshold. In a parallel path the frame motion signal is alsothresholded by threshold 1616 under control of a motion threshold toform a motion yes/no signal which is then ANDed in AND-gate 1618 withthe horizontal transition signal, allowing only moving horizontal edgesto pass. Moving horizontal edges are applied to an H rate (horizontalrate) moving horizontal edge accumulator 1620 in which the number ofdistinct moving edges, determined by detecting their peaks, isaccumulated over the course of one line.

The sawtooth detection input portion receives the F0_(Saw) and F2_(Saw)outputs from the F0 sawtooth detector and the F2 sawtooth detectors,respectively. The F0_(Saw) and F2_(Saw) signals are applied torespective H min (horizontal minimum) detectors 1622 and 1624. For asawtooth to be detected it must have a minimum horizontal duration oftwo pixels. The number of sawtooth instances having more than theminimum two pixel duration during the time period of each horizontalline are accumulated in respective H rate sawtooth instant accumulators1626 and 1628. The number of instances for the F0 and F2 signals areapplied to two parallel paths, 1630 and 1632, representing the currentlydisplayed field and the alternate field, respectively. The determinationof which is F0 and which is F2 depends on the state of the F0/F2 switchin the system (as determined by the NTSC or PAL film detector). TheF0/F2 signal from the NTSC or PAL film detectors controls a double-pole,double-throw switch 1629 which reverses the F0_(Saw) and F2_(Saw) signalinputs depending on the polarity of the F0/F2 signal.

In the currently displayed path 1630, the number of sawtooths on thecurrently displayed field is divided by the number of moving edges in adivider 1634. If the quotient is greater than the sawtooth moving edgeratio as determined by a threshold 1636, then a counter 1638 isincremented. If the next line does not meet the same criteria, thecounter 1638 is reset. Once the counter reaches the current fieldsawtooth V min threshold set by a threshold 1640, an edit is detected.

There are certain cases when the currently displayed edit detector path1630 fails. This is when the motion detection occurs between fields ofdifferent scenes, causing most of the field to appear to be in motion.This greatly raises the number of horizontal transitions that are seento be moving, which has the effect of lowering the horizontaltransitions to sawtooths ratio and keeping an edit from being detected.This is a problem principally when the two fields that are interleavedcome from the same information--generally the post edit information (seeexample below). The alternate field edit detector in path 1632 addressesthis problem.

The alternate field edit detector portion of the sawtooth based editdetector takes as its input the number of detected sawtooths from thenon-currently-displayed field. The number should generally be large ifthe field is in motion. The signal passes through a switch 1642controlled by the occurrence of any sawtooths in the currently displayedfield. If there are none, then the switch outputs 0, otherwise itoutputs the number of sawtooths detected. This number is then comparedwith the number of moving edges in comparator 1644. If it is equal to orgreater than the number of moving edges, the counter 1646 isincremented. If the next line does not meet the same criteria then thecounter is reset. Once the counter 1646 reaches the Alternate fieldsawtooth V Min threshold set by a threshold 1648, an edit is detected.The outputs of the two processing branches are applied to an OR gate 950so that whichever branch detects an edit, that output is applied to afinal switch 1652 which ensures that the edit detector only detectsedits on film material.

In order to better understand the operation of the sawtooth based editdetector, consider the following example. A film stream with an editmight look like AAABB122233, where the letters represent pre-editinformation and the numbers represent post-edit material. Assume thatthe film detector interleaves 1 and 2 and there is motion between thesefields. Therefore, sawtooths are visible (assume five sawtooths perline). This will also imply that there are five moving edges per line.The frame motion path subtracts B-2, so all of the field is seen asmoving. Now every edge in field 1 is seen as moving. If there are twentyedges, all twenty are seen as moving. The ratio of sawtooths versusmoving edges in no longer 5/5, but 5/20 which lies below the threshold,so no edit is detected. The alternate field path now is detectingsawtooths between B and 1. This will be a number generally greater thanor equal to the actual number of transitions in field 1. (Note: this isthe case for moving film as well). For our example, assume thirtysawtooths were detected per line. Thirty sawtooths is greater thantwenty moving edges and there are five sawtooths on the currentlydisplayed field, so an edit is detected. For standard film there wouldbe no sawtooths on the currently displayed field, so no edit would bedetected. Because computer generated single line material can meet theserequirements, a vertical minimum threshold has been imposed.

The sawtooth based edit detector has nine adjustable parameters: an Hedge threshold, a motion threshold, a sawtooth moving edge ratio, acurrent field sawtooth V min threshold, an alternate field sawtooth Vmin threshold and four edit blanking parameters that define the area ofedit detection: edit blanking top line, edit blanking bottom line, editblanking right side, edit blanking left side.

I claim:
 1. A sawtooth based edit detector, comprisinga moving edgedetector portion, said moving edge detector portion includingahorizontal transition detector receiving an input interlaced videosignal and a signal indicating the presence of frame motion in the videosignal at the detected transition and outputting a signal responsiveonly to horizontal moving edges, and a horizontal edge accumulatorreceiving said horizontal moving edges and outputting an indication ofthe number of horizontal moving edges during a portion of the videosignal, and a sawtooth detector portion, said sawtooth detector portionreceiving the outputs of two detectors indicating, respectively, thatthe interleaving of the first pair or the second pair of threeconsecutive interlaced fields would result in the production of asawtooth artifact, and said sawtooth detector portion also receiving asignal indicating the pair of interlaced fields in a sequence of threefields that are merged when the video signal has a film source, saidsawtooth detection portion comprisingfirst and second sawtoothaccumulators receiving the outputs of said two detectors, respectively,and each outputting an indication of the number of sawtooth artifactshaving a minimum duration during said portion of the video signal, afirst comparator and a first counter, the first comparator comparing thenumber of sawtooths from said first sawtooth accumulator to the numberof horizontal moving edges, incrementing the first counter when apredetermined ratio is exceeded during said portion of the video signal,and resetting the first counter when said predetermined ratio is notexceeded during said portion of the video signal, a first threshold,said threshold outputting a first edit detect signal when said firstcounter reaches a predetermined count, a second comparator and a secondcounter receiving the number of sawtooths from said second sawtoothaccumulator when the first sawtooth accumulator indicates the occurrenceof any sawtooth artifacts in the field being sensed by the firstsawtooth accumulator and otherwise receiving an input of 0, the secondcomparator comparing the number of sawtooths from said second sawtoothaccumulator or 0 to the number of horizontal moving edges, incrementingthe counter when a predetermined ratio is exceeded during said portionof the video signal, and resetting the counter when said predeterminedratio is not exceeded during said portion of the video signal, a secondthreshold, said second threshold outputting a second edit detect signalwhen said second counter reaches a predetermined count, an edit outputoutputting an edit signal upon the occurrence of said first edit detectsignal or said second edit detect signal.
 2. The sawtooth based editdetector of claim 1 wherein said portion of the video signal is onehorizontal line.
 3. The sawtooth based edit detector of claim 1 whereinsaid horizontal transition detector includes a delay, a low pass filterand a rectifier.